﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.UnityAPICompatibilityVersionAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Declares an assembly to be compatible (API wise) with a specific Unity API. Used by internal tools to avoid processing the assembly in order to decide whether assemblies may be using old Unity API.</para>
  /// </summary>
  [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
  public class UnityAPICompatibilityVersionAttribute : Attribute
  {
    private string _version;
    private string[] _configurationAssembliesHashes;

    /// <summary>
    ///   <para>Initializes a new instance of UnityAPICompatibilityVersionAttribute. This overload has been deprecated.</para>
    /// </summary>
    /// <param name="version">Unity version that this assembly is compatible with.</param>
    [Obsolete("This overload of the attribute has been deprecated. Use the constructor that takes the version and a boolean", true)]
    public UnityAPICompatibilityVersionAttribute(string version) => this._version = version;

    /// <summary>
    ///   <para>Initializes a new instance of UnityAPICompatibilityVersionAttribute.</para>
    /// </summary>
    /// <param name="version">Unity version that this assembly is compatible with.</param>
    /// <param name="checkOnlyUnityVersion">Must be set to true.</param>
    public UnityAPICompatibilityVersionAttribute(string version, bool checkOnlyUnityVersion)
    {
      if (!checkOnlyUnityVersion)
        throw new ArgumentException("You must pass 'true' to checkOnlyUnityVersion parameter.");
      this._version = version;
    }

    /// <summary>
    ///   <para>Initializes a new instance of UnityAPICompatibilityVersionAttribute. This constructor is used by internal tooling.</para>
    /// </summary>
    /// <param name="version">Unity version that this assembly is compatible with.</param>
    /// <param name="configurationAssembliesHashes">A comma-separated list comprised of the assembly name and attribute hash pairs. For example, assemblyname:hash,assemblyname:hash.</param>
    public UnityAPICompatibilityVersionAttribute(
      string version,
      string[] configurationAssembliesHashes)
    {
      this._version = version;
      this._configurationAssembliesHashes = configurationAssembliesHashes;
    }

    /// <summary>
    ///   <para>Version of Unity API.</para>
    /// </summary>
    public string version => this._version;

    internal string[] configurationAssembliesHashes => this._configurationAssembliesHashes;
  }
}
